<!DOCTYPE html>


<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Phaser CE Class: BitmapData</title>
	<link rel="stylesheet" href="styles/site.phaser.css?2024100511">
</head>

<body>


<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
  <div class="container-fluid">
  	<div class="navbar-header">
  		<a class="navbar-brand" href="index.html">Phaser CE</a>
  		<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
  			<span class="icon-bar"></span>
  			<span class="icon-bar"></span>
  			<span class="icon-bar"></span>
      </button>
  	</div>
  	<div class="navbar-collapse collapse" id="topNavigation">
  		<ul class="nav navbar-nav">
  			
  			<li class="dropdown">
  				<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
  				<ul class="dropdown-menu ">
  					<li><a href="Phaser.html">Phaser</a></li><li><a href="PhaserGlobal.html">PhaserGlobal</a></li><li><a href="PIXI.html">PIXI</a></li>
  				</ul>
  			</li>
  			
  			<li class="dropdown">
  				<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
  				<ul class="dropdown-menu ">
  					<li><a href="CreatureShader.html">CreatureShader</a></li><li><a href="EarCut.html">EarCut</a></li><li><a href="Event.html">Event</a></li><li><a href="EventTarget.html">EventTarget</a></li><li><a href="Phaser.Animation.html">Phaser.Animation</a></li><li><a href="Phaser.AnimationManager.html">Phaser.AnimationManager</a></li><li><a href="Phaser.AnimationParser.html">Phaser.AnimationParser</a></li><li><a href="Phaser.ArraySet.html">Phaser.ArraySet</a></li><li><a href="Phaser.ArrayUtils.html">Phaser.ArrayUtils</a></li><li><a href="Phaser.AudioSprite.html">Phaser.AudioSprite</a></li><li><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></li><li><a href="Phaser.BitmapText.html">Phaser.BitmapText</a></li><li><a href="Phaser.Bullet.html">Phaser.Bullet</a></li><li><a href="Phaser.Button.html">Phaser.Button</a></li><li><a href="Phaser.Cache.html">Phaser.Cache</a></li><li><a href="Phaser.Camera.html">Phaser.Camera</a></li><li><a href="Phaser.Canvas.html">Phaser.Canvas</a></li><li><a href="Phaser.CanvasPool.html">Phaser.CanvasPool</a></li><li><a href="Phaser.Circle.html">Phaser.Circle</a></li><li><a href="Phaser.Color.html">Phaser.Color</a></li><li><a href="Phaser.Component.Angle.html">Phaser.Component.Angle</a></li><li><a href="Phaser.Component.Animation.html">Phaser.Component.Animation</a></li><li><a href="Phaser.Component.AutoCull.html">Phaser.Component.AutoCull</a></li><li><a href="Phaser.Component.Bounds.html">Phaser.Component.Bounds</a></li><li><a href="Phaser.Component.BringToTop.html">Phaser.Component.BringToTop</a></li><li><a href="Phaser.Component.Core.html">Phaser.Component.Core</a></li><li><a href="Phaser.Component.Crop.html">Phaser.Component.Crop</a></li><li><a href="Phaser.Component.Delta.html">Phaser.Component.Delta</a></li><li><a href="Phaser.Component.Destroy.html">Phaser.Component.Destroy</a></li><li><a href="Phaser.Component.FixedToCamera.html">Phaser.Component.FixedToCamera</a></li><li><a href="Phaser.Component.Health.html">Phaser.Component.Health</a></li><li><a href="Phaser.Component.InCamera.html">Phaser.Component.InCamera</a></li><li><a href="Phaser.Component.InputEnabled.html">Phaser.Component.InputEnabled</a></li><li><a href="Phaser.Component.InWorld.html">Phaser.Component.InWorld</a></li><li><a href="Phaser.Component.LifeSpan.html">Phaser.Component.LifeSpan</a></li><li><a href="Phaser.Component.LoadTexture.html">Phaser.Component.LoadTexture</a></li><li><a href="Phaser.Component.Overlap.html">Phaser.Component.Overlap</a></li><li><a href="Phaser.Component.PhysicsBody.html">Phaser.Component.PhysicsBody</a></li><li><a href="Phaser.Component.Reset.html">Phaser.Component.Reset</a></li><li><a href="Phaser.Component.ScaleMinMax.html">Phaser.Component.ScaleMinMax</a></li><li><a href="Phaser.Component.Smoothed.html">Phaser.Component.Smoothed</a></li><li><a href="Phaser.Create.html">Phaser.Create</a></li><li><a href="Phaser.Creature.html">Phaser.Creature</a></li><li><a href="Phaser.Device.html">Phaser.Device</a></li><li><a href="Phaser.DeviceButton.html">Phaser.DeviceButton</a></li><li><a href="Phaser.DOM.html">Phaser.DOM</a></li><li><a href="Phaser.Easing.html">Phaser.Easing</a></li><li><a href="Phaser.Easing.Back.html">Phaser.Easing.Back</a></li><li><a href="Phaser.Easing.Bounce.html">Phaser.Easing.Bounce</a></li><li><a href="Phaser.Easing.Circular.html">Phaser.Easing.Circular</a></li><li><a href="Phaser.Easing.Cubic.html">Phaser.Easing.Cubic</a></li><li><a href="Phaser.Easing.Elastic.html">Phaser.Easing.Elastic</a></li><li><a href="Phaser.Easing.Exponential.html">Phaser.Easing.Exponential</a></li><li><a href="Phaser.Easing.Linear.html">Phaser.Easing.Linear</a></li><li><a href="Phaser.Easing.Quadratic.html">Phaser.Easing.Quadratic</a></li><li><a href="Phaser.Easing.Quartic.html">Phaser.Easing.Quartic</a></li><li><a href="Phaser.Easing.Quintic.html">Phaser.Easing.Quintic</a></li><li><a href="Phaser.Easing.Sinusoidal.html">Phaser.Easing.Sinusoidal</a></li><li><a href="Phaser.Ellipse.html">Phaser.Ellipse</a></li><li><a href="Phaser.Events.html">Phaser.Events</a></li><li><a href="Phaser.Filter.html">Phaser.Filter</a></li><li><a href="Phaser.FlexGrid.html">Phaser.FlexGrid</a></li><li><a href="Phaser.FlexLayer.html">Phaser.FlexLayer</a></li><li><a href="Phaser.Frame.html">Phaser.Frame</a></li><li><a href="Phaser.FrameData.html">Phaser.FrameData</a></li><li><a href="Phaser.Game.html">Phaser.Game</a></li><li><a href="Phaser.GameObjectCreator.html">Phaser.GameObjectCreator</a></li><li><a href="Phaser.GameObjectFactory.html">Phaser.GameObjectFactory</a></li><li><a href="Phaser.Gamepad.html">Phaser.Gamepad</a></li><li><a href="Phaser.Graphics.html">Phaser.Graphics</a></li><li><a href="Phaser.GraphicsData.html">Phaser.GraphicsData</a></li><li><a href="Phaser.Group.html">Phaser.Group</a></li><li><a href="Phaser.Hermite.html">Phaser.Hermite</a></li><li><a href="Phaser.Image.html">Phaser.Image</a></li><li><a href="Phaser.ImageCollection.html">Phaser.ImageCollection</a></li><li><a href="Phaser.Input.html">Phaser.Input</a></li><li><a href="Phaser.InputHandler.html">Phaser.InputHandler</a></li><li><a href="Phaser.Key.html">Phaser.Key</a></li><li><a href="Phaser.Keyboard.html">Phaser.Keyboard</a></li><li><a href="Phaser.KeyCode.html">Phaser.KeyCode</a></li><li><a href="Phaser.Line.html">Phaser.Line</a></li><li><a href="Phaser.LinkedList.html">Phaser.LinkedList</a></li><li><a href="Phaser.Loader.html">Phaser.Loader</a></li><li><a href="Phaser.LoaderParser.html">Phaser.LoaderParser</a></li><li><a href="Phaser.Math.html">Phaser.Math</a></li><li><a href="Phaser.Matrix.html">Phaser.Matrix</a></li><li><a href="Phaser.Mouse.html">Phaser.Mouse</a></li><li><a href="Phaser.MouseWheel.html">Phaser.MouseWheel</a></li><li><a href="Phaser.MSPointer.html">Phaser.MSPointer</a></li><li><a href="Phaser.Particle.html">Phaser.Particle</a></li><li><a href="Phaser.Particles.html">Phaser.Particles</a></li><li><a href="Phaser.Particles.Arcade.html">Phaser.Particles.Arcade</a></li><li><a href="Phaser.Particles.Arcade.Emitter.html">Phaser.Particles.Arcade.Emitter</a></li><li><a href="Phaser.Path.html">Phaser.Path</a></li><li><a href="Phaser.PathFollower.html">Phaser.PathFollower</a></li><li><a href="Phaser.PathPoint.html">Phaser.PathPoint</a></li><li><a href="Phaser.Physics.html">Phaser.Physics</a></li><li><a href="Phaser.Physics.Arcade.html">Phaser.Physics.Arcade</a></li><li><a href="Phaser.Physics.Arcade.Body.html">Phaser.Physics.Arcade.Body</a></li><li><a href="Phaser.Physics.Arcade.TilemapCollision.html">Phaser.Physics.Arcade.TilemapCollision</a></li><li><a href="Phaser.Physics.Ninja.html">Phaser.Physics.Ninja</a></li><li><a href="Phaser.Physics.Ninja.AABB.html">Phaser.Physics.Ninja.AABB</a></li><li><a href="Phaser.Physics.Ninja.Body.html">Phaser.Physics.Ninja.Body</a></li><li><a href="Phaser.Physics.Ninja.Circle.html">Phaser.Physics.Ninja.Circle</a></li><li><a href="Phaser.Physics.Ninja.Tile.html">Phaser.Physics.Ninja.Tile</a></li><li><a href="Phaser.Physics.P2.html">Phaser.Physics.P2</a></li><li><a href="Phaser.Physics.P2.Body.html">Phaser.Physics.P2.Body</a></li><li><a href="Phaser.Physics.P2.BodyDebug.html">Phaser.Physics.P2.BodyDebug</a></li><li><a href="Phaser.Physics.P2.CollisionGroup.html">Phaser.Physics.P2.CollisionGroup</a></li><li><a href="Phaser.Physics.P2.ContactMaterial.html">Phaser.Physics.P2.ContactMaterial</a></li><li><a href="Phaser.Physics.P2.DistanceConstraint.html">Phaser.Physics.P2.DistanceConstraint</a></li><li><a href="Phaser.Physics.P2.FixtureList.html">Phaser.Physics.P2.FixtureList</a></li><li><a href="Phaser.Physics.P2.GearConstraint.html">Phaser.Physics.P2.GearConstraint</a></li><li><a href="Phaser.Physics.P2.InversePointProxy.html">Phaser.Physics.P2.InversePointProxy</a></li><li><a href="Phaser.Physics.P2.LockConstraint.html">Phaser.Physics.P2.LockConstraint</a></li><li><a href="Phaser.Physics.P2.Material.html">Phaser.Physics.P2.Material</a></li><li><a href="Phaser.Physics.P2.PointProxy.html">Phaser.Physics.P2.PointProxy</a></li><li><a href="Phaser.Physics.P2.PrismaticConstraint.html">Phaser.Physics.P2.PrismaticConstraint</a></li><li><a href="Phaser.Physics.P2.RevoluteConstraint.html">Phaser.Physics.P2.RevoluteConstraint</a></li><li><a href="Phaser.Physics.P2.RotationalSpring.html">Phaser.Physics.P2.RotationalSpring</a></li><li><a href="Phaser.Physics.P2.Spring.html">Phaser.Physics.P2.Spring</a></li><li><a href="Phaser.Plugin.html">Phaser.Plugin</a></li><li><a href="Phaser.Plugin.PathManager.html">Phaser.Plugin.PathManager</a></li><li><a href="Phaser.PluginManager.html">Phaser.PluginManager</a></li><li><a href="Phaser.Point.html">Phaser.Point</a></li><li><a href="Phaser.Pointer.html">Phaser.Pointer</a></li><li><a href="Phaser.PointerLock.html">Phaser.PointerLock</a></li><li><a href="Phaser.PointerMode.html">Phaser.PointerMode</a></li><li><a href="Phaser.Polygon.html">Phaser.Polygon</a></li><li><a href="Phaser.QuadTree.html">Phaser.QuadTree</a></li><li><a href="Phaser.RandomDataGenerator.html">Phaser.RandomDataGenerator</a></li><li><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></li><li><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></li><li><a href="Phaser.RequestAnimationFrame.html">Phaser.RequestAnimationFrame</a></li><li><a href="Phaser.RetroFont.html">Phaser.RetroFont</a></li><li><a href="Phaser.Rope.html">Phaser.Rope</a></li><li><a href="Phaser.RoundedRectangle.html">Phaser.RoundedRectangle</a></li><li><a href="Phaser.ScaleManager.html">Phaser.ScaleManager</a></li><li><a href="Phaser.Signal.html">Phaser.Signal</a></li><li><a href="Phaser.SignalBinding.html">Phaser.SignalBinding</a></li><li><a href="Phaser.SinglePad.html">Phaser.SinglePad</a></li><li><a href="Phaser.Sound.html">Phaser.Sound</a></li><li><a href="Phaser.SoundManager.html">Phaser.SoundManager</a></li><li><a href="Phaser.Sprite.html">Phaser.Sprite</a></li><li><a href="Phaser.SpriteBatch.html">Phaser.SpriteBatch</a></li><li><a href="Phaser.Stage.html">Phaser.Stage</a></li><li><a href="Phaser.State.html">Phaser.State</a></li><li><a href="Phaser.StateManager.html">Phaser.StateManager</a></li><li><a href="Phaser.Text.html">Phaser.Text</a></li><li><a href="Phaser.Tile.html">Phaser.Tile</a></li><li><a href="Phaser.Tilemap.html">Phaser.Tilemap</a></li><li><a href="Phaser.TilemapLayer.html">Phaser.TilemapLayer</a></li><li><a href="Phaser.TilemapParser.html">Phaser.TilemapParser</a></li><li><a href="Phaser.Tileset.html">Phaser.Tileset</a></li><li><a href="Phaser.TileSprite.html">Phaser.TileSprite</a></li><li><a href="Phaser.Time.html">Phaser.Time</a></li><li><a href="Phaser.Timer.html">Phaser.Timer</a></li><li><a href="Phaser.TimerEvent.html">Phaser.TimerEvent</a></li><li><a href="Phaser.Touch.html">Phaser.Touch</a></li><li><a href="Phaser.Tween.html">Phaser.Tween</a></li><li><a href="Phaser.TweenData.html">Phaser.TweenData</a></li><li><a href="Phaser.TweenManager.html">Phaser.TweenManager</a></li><li><a href="Phaser.Utils.html">Phaser.Utils</a></li><li><a href="Phaser.Utils.Debug.html">Phaser.Utils.Debug</a></li><li><a href="Phaser.Video.html">Phaser.Video</a></li><li><a href="Phaser.Weapon.html">Phaser.Weapon</a></li><li><a href="Phaser.World.html">Phaser.World</a></li><li><a href="PIXI.BaseTexture.html">PIXI.BaseTexture</a></li><li><a href="PIXI.CanvasBuffer.html">PIXI.CanvasBuffer</a></li><li><a href="PIXI.CanvasGraphics.html">PIXI.CanvasGraphics</a></li><li><a href="PIXI.CanvasMaskManager.html">PIXI.CanvasMaskManager</a></li><li><a href="PIXI.CanvasRenderer.html">PIXI.CanvasRenderer</a></li><li><a href="PIXI.CanvasTinter.html">PIXI.CanvasTinter</a></li><li><a href="PIXI.ComplexPrimitiveShader.html">PIXI.ComplexPrimitiveShader</a></li><li><a href="PIXI.DisplayObject.html">PIXI.DisplayObject</a></li><li><a href="PIXI.DisplayObjectContainer.html">PIXI.DisplayObjectContainer</a></li><li><a href="PIXI.FilterTexture.html">PIXI.FilterTexture</a></li><li><a href="PIXI.PixiFastShader.html">PIXI.PixiFastShader</a></li><li><a href="PIXI.PixiShader.html">PIXI.PixiShader</a></li><li><a href="PIXI.PrimitiveShader.html">PIXI.PrimitiveShader</a></li><li><a href="PIXI.Sprite.html">PIXI.Sprite</a></li><li><a href="PIXI.StripShader.html">PIXI.StripShader</a></li><li><a href="PIXI.Texture.html">PIXI.Texture</a></li><li><a href="PIXI.WebGLBlendModeManager.html">PIXI.WebGLBlendModeManager</a></li><li><a href="PIXI.WebGLFastSpriteBatch.html">PIXI.WebGLFastSpriteBatch</a></li><li><a href="PIXI.WebGLFilterManager.html">PIXI.WebGLFilterManager</a></li><li><a href="PIXI.WebGLRenderer.html">PIXI.WebGLRenderer</a></li>
  				</ul>
  			</li>
  			
  			<li class="dropdown">
  				<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
  				<ul class="dropdown-menu ">
  					<li><a href="global.html">Global</a></li>
  				</ul>
  			</li>
  			
        <li>
  <a href="https://github.com/photonstorm/phaser-ce/blob/master/README.md">
    <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
    README
  </a>
</li>

<li>
  <a href="https://github.com/photonstorm/phaser-ce/blob/master/CHANGELOG.md">
    <span class="glyphicon glyphicon-list" aria-hidden="true"></span>
    CHANGELOG
  </a>
</li>

<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
    <span class="glyphicon glyphicon-globe" aria-hidden="true"></span>
    Community
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu">
    <li>
      <a href="http://phaser.io">Phaser</a>
    </li>
    <li>
      <a href="https://github.com/photonstorm/phaser-ce">Phaser CE on GitHub</a>
    </li>
    <li>
      <a href="https://codepen.io/collection/AMbZgY/">Phaser CE Examples</a>
    </li>
    <li>
      <a href="http://www.html5gamedevs.com/forum/14-phaser/">Forum</a>
    </li>
    <li>
      <a href="https://twitter.com/photonstorm">Twitter</a>
    </li>
    <li>
      <a href="http://phaser.io/community/slack">Slack</a>
    </li>
    <li>
      <a href="http://phaser.io/community/donate">Donate</a>
    </li>
  </ul>
</li>

  		</ul>
          
  	</div>
  </div>
</div>


<div class="container-fluid" id="toc-content">
	<div class="row">
		
	  <div class="col-md-9 col-md-offset-3">
		
			<div id="main">

	<h1 class="page-title">Class: BitmapData</h1>
<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
        
        BitmapData
        </h2>
        
    
</header>


<article>
    <div class="container-overview">
    
        
<dt>
    <h4 class="name" id="BitmapData" data-name="BitmapData">
      <span class="type-signature"></span>new BitmapData(game, key [, width] [, height] [, skipPool])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations.
A single BitmapData can be used as the texture for one or many Images / Sprites.
So if you need to dynamically create a Sprite texture then they are a good choice.</p>
<p>Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't
live on the display list, they are NOT automatically cleared when you change State. Therefore you <em>must</em> call BitmapData.destroy
in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>game</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>A reference to the currently running game.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>Internal Phaser reference key for the BitmapData.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    256
                
                </td>
            

            <td class="description param-description last"><p>The width of the BitmapData in pixels. If undefined or zero it's set to a default value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    256
                
                </td>
            

            <td class="description param-description last"><p>The height of the BitmapData in pixels. If undefined or zero it's set to a default value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>skipPool</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>When this BitmapData generates its internal canvas to use for rendering, it will get the canvas from the CanvasPool if false, or create its own if true.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L24" title="BitmapData on line 24 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 24</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

    
    </div>

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        <dl>
            
<dt>
    <h4 id="baseTexture" data-name="baseTexture">
      <span class="type-signature"></span>baseTexture<span class="type-signature"> : <a href="PIXI.BaseTexture.html">PIXI.BaseTexture</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The PIXI.BaseTexture.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="PIXI.BaseTexture.html">PIXI.BaseTexture</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L122" title="baseTexture on line 122 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 122</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="canvas" data-name="canvas">
      <span class="type-signature"></span>canvas<span class="type-signature"> : HTMLCanvasElement</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The canvas to which this BitmapData draws.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">HTMLCanvasElement</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L54" title="canvas on line 54 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 54</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="context" data-name="context">
      <span class="type-signature"></span>context<span class="type-signature"> : CanvasRenderingContext2D</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The 2d context of the canvas.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">CanvasRenderingContext2D</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L60" title="context on line 60 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 60</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="ctx" data-name="ctx">
      <span class="type-signature"></span>ctx<span class="type-signature"> : CanvasRenderingContext2D</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>A reference to BitmapData.context.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">CanvasRenderingContext2D</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L65" title="ctx on line 65 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 65</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="data" data-name="data">
      <span class="type-signature"></span>data<span class="type-signature"> : Uint8ClampedArray</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>A Uint8ClampedArray view into BitmapData.buffer.
Note that this is unavailable in some browsers (such as Epic Browser due to its security restrictions)</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">Uint8ClampedArray</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L84" title="data on line 84 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 84</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="dirty" data-name="dirty">
      <span class="type-signature"></span>dirty<span class="type-signature"> : boolean</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>If dirty this BitmapData will be re-rendered.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L157" title="dirty on line 157 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 157</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="disableTextureUpload" data-name="disableTextureUpload">
      <span class="type-signature"></span>disableTextureUpload<span class="type-signature"> : boolean</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>If disableTextureUpload is true this BitmapData will never send its image data to the GPU when its dirty flag is true.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L152" title="disableTextureUpload on line 152 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 152</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="frameData" data-name="frameData">
      <span class="type-signature"></span>frameData<span class="type-signature"> : <a href="Phaser.FrameData.html">Phaser.FrameData</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The FrameData container this BitmapData uses for rendering.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.FrameData.html">Phaser.FrameData</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L133" title="frameData on line 133 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 133</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="game" data-name="game">
      <span class="type-signature"></span>game<span class="type-signature"> : <a href="Phaser.Game.html">Phaser.Game</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>A reference to the currently running game.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L33" title="game on line 33 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 33</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="height" data-name="height">
      <span class="type-signature"></span>height<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The height of the BitmapData in pixels.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L48" title="height on line 48 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 48</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="imageData" data-name="imageData">
      <span class="type-signature"></span>imageData<span class="type-signature"> : ImageData</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The context image data.
Please note that a call to BitmapData.draw() or BitmapData.copy() does not update immediately this property for performance reason. Use BitmapData.update() to do so.
This property is updated automatically after the first game loop, according to the dirty flag property.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">ImageData</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L77" title="imageData on line 77 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 77</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="key" data-name="key">
      <span class="type-signature"></span>key<span class="type-signature"> : string</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The key of the BitmapData in the Cache, if stored there.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L38" title="key on line 38 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 38</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="op" data-name="op">
      <span class="type-signature"></span>op<span class="type-signature"> : string</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>A short-hand code to get or set the global composite operation of the BitmapDatas canvas.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2478" title="op on line 2478 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2478</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="pixels" data-name="pixels">
      <span class="type-signature"></span>pixels<span class="type-signature"> : Uint32Array</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>An Uint32Array view into BitmapData.buffer.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">Uint32Array</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L94" title="pixels on line 94 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 94</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="smoothed" data-name="smoothed">
      <span class="type-signature"></span>smoothed<span class="type-signature"> : boolean</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>Gets or sets this BitmapData.contexts smoothing enabled value.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2460" title="smoothed on line 2460 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2460</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="smoothProperty" data-name="smoothProperty">
      <span class="type-signature"></span>smoothProperty<span class="type-signature"> : string</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The context property needed for smoothing this Canvas.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L70" title="smoothProperty on line 70 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 70</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="texture" data-name="texture">
      <span class="type-signature"></span>texture<span class="type-signature"> : <a href="PIXI.Texture.html">PIXI.Texture</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The PIXI.Texture.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="PIXI.Texture.html">PIXI.Texture</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L128" title="texture on line 128 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 128</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="textureFrame" data-name="textureFrame">
      <span class="type-signature"></span>textureFrame<span class="type-signature"> : <a href="Phaser.Frame.html">Phaser.Frame</a></span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The Frame this BitmapData uses for rendering.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L139" title="textureFrame on line 139 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 139</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="type" data-name="type">
      <span class="type-signature"></span>type<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The const type of this object.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L147" title="type on line 147 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 147</a>
    

	

	

	
</dl>


    
</dd>

        
            
<dt>
    <h4 id="width" data-name="width">
      <span class="type-signature"></span>width<span class="type-signature"> : number</span>
      
    </h4>
    
</dt>
<dd>
    
    <div class="description members-description">
        <p>The width of the BitmapData in pixels.</p>
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>



            </li>
        </ul>
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L43" title="width on line 43 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 43</a>
    

	

	

	
</dl>


    
</dd>

        </dl>
    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<dt>
    <h4 class="name" id=".getTransform" data-name="getTransform">
      <span class="type-signature">&lt;static> </span>getTransform(translateX, translateY, scaleX, scaleY, skewX, skewY)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Gets a JavaScript object that has 6 properties set that are used by BitmapData in a transform.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>translateX</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The x translate value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>translateY</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The y translate value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scaleX</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The scale x value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scaleY</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The scale y value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>skewX</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The skew x value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>skewY</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The skew y value.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2496" title="getTransform on line 2496 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2496</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>A JavaScript object containing all of the properties BitmapData needs for transforms.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">object</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="add" data-name="add">
      <span class="type-signature"></span>add(object)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Updates the given objects so that they use this BitmapData as their texture.
This will replace any texture they will currently have set.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>object</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Sprite.html">Phaser.Sprite</a>></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type">Array.&lt;<a href="Phaser.Image.html">Phaser.Image</a>></span>



            
            </td>

            

            

            <td class="description param-description last"><p>Either a single Sprite/Image or an Array of Sprites/Images.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L387" title="add on line 387 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 387</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="addToWorld" data-name="addToWorld">
      <span class="type-signature"></span>addToWorld( [x] [, y] [, anchorX] [, anchorY] [, scaleX] [, scaleY])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate to place the Image at.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate to place the Image at.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>anchorX</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>anchorY</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scaleX</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scaleY</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1232" title="addToWorld on line 1232 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1232</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The newly added Image object.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="alphaMask" data-name="alphaMask">
      <span class="type-signature"></span>alphaMask(source [, mask] [, sourceRect] [, maskRect])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws the image onto this BitmapData using an image as an alpha mask.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>source</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|

<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|

<span class="param-type">Image</span>
|

<span class="param-type">HTMLCanvasElement</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mask</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|

<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|

<span class="param-type">Image</span>
|

<span class="param-type">HTMLCanvasElement</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The object to be used as the mask. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. If you don't provide a mask it will use this BitmapData as the mask.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sourceRect</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>A Rectangle where x/y define the coordinates to draw the Source image to and width/height define the size.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>maskRect</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>A Rectangle where x/y define the coordinates to draw the Mask image to and width/height define the size.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1780" title="alphaMask on line 1780 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1780</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendAdd" data-name="blendAdd">
      <span class="type-signature"></span>blendAdd()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'lighter'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2240" title="blendAdd on line 2240 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2240</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendColor" data-name="blendColor">
      <span class="type-signature"></span>blendColor()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'color'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2408" title="blendColor on line 2408 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2408</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendColorBurn" data-name="blendColorBurn">
      <span class="type-signature"></span>blendColorBurn()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'color-burn'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2324" title="blendColorBurn on line 2324 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2324</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendColorDodge" data-name="blendColorDodge">
      <span class="type-signature"></span>blendColorDodge()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'color-dodge'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2312" title="blendColorDodge on line 2312 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2312</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendDarken" data-name="blendDarken">
      <span class="type-signature"></span>blendDarken()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'darken'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2288" title="blendDarken on line 2288 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2288</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendDestinationAtop" data-name="blendDestinationAtop">
      <span class="type-signature"></span>blendDestinationAtop()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'destination-atop'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2216" title="blendDestinationAtop on line 2216 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2216</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendDestinationIn" data-name="blendDestinationIn">
      <span class="type-signature"></span>blendDestinationIn()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'destination-in'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2192" title="blendDestinationIn on line 2192 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2192</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendDestinationOut" data-name="blendDestinationOut">
      <span class="type-signature"></span>blendDestinationOut()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'destination-out'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2204" title="blendDestinationOut on line 2204 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2204</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendDestinationOver" data-name="blendDestinationOver">
      <span class="type-signature"></span>blendDestinationOver()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'destination-over'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2180" title="blendDestinationOver on line 2180 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2180</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendDifference" data-name="blendDifference">
      <span class="type-signature"></span>blendDifference()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'difference'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2360" title="blendDifference on line 2360 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2360</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendExclusion" data-name="blendExclusion">
      <span class="type-signature"></span>blendExclusion()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'exclusion'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2372" title="blendExclusion on line 2372 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2372</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendHardLight" data-name="blendHardLight">
      <span class="type-signature"></span>blendHardLight()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'hard-light'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2336" title="blendHardLight on line 2336 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2336</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendHue" data-name="blendHue">
      <span class="type-signature"></span>blendHue()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'hue'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2384" title="blendHue on line 2384 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2384</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendLighten" data-name="blendLighten">
      <span class="type-signature"></span>blendLighten()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'lighten'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2300" title="blendLighten on line 2300 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2300</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendLuminosity" data-name="blendLuminosity">
      <span class="type-signature"></span>blendLuminosity()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'luminosity'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2420" title="blendLuminosity on line 2420 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2420</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendMultiply" data-name="blendMultiply">
      <span class="type-signature"></span>blendMultiply()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'multiply'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2252" title="blendMultiply on line 2252 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2252</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendOverlay" data-name="blendOverlay">
      <span class="type-signature"></span>blendOverlay()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'overlay'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2276" title="blendOverlay on line 2276 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2276</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendReset" data-name="blendReset">
      <span class="type-signature"></span>blendReset()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Resets the blend mode (effectively sets it to 'source-over')</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2120" title="blendReset on line 2120 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2120</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendSaturation" data-name="blendSaturation">
      <span class="type-signature"></span>blendSaturation()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'saturation'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2396" title="blendSaturation on line 2396 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2396</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendScreen" data-name="blendScreen">
      <span class="type-signature"></span>blendScreen()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'screen'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2264" title="blendScreen on line 2264 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2264</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendSoftLight" data-name="blendSoftLight">
      <span class="type-signature"></span>blendSoftLight()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'soft-light'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2348" title="blendSoftLight on line 2348 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2348</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendSourceAtop" data-name="blendSourceAtop">
      <span class="type-signature"></span>blendSourceAtop()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'source-atop'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2168" title="blendSourceAtop on line 2168 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2168</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendSourceIn" data-name="blendSourceIn">
      <span class="type-signature"></span>blendSourceIn()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'source-in'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2144" title="blendSourceIn on line 2144 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2144</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendSourceOut" data-name="blendSourceOut">
      <span class="type-signature"></span>blendSourceOut()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'source-out'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2156" title="blendSourceOut on line 2156 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2156</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendSourceOver" data-name="blendSourceOver">
      <span class="type-signature"></span>blendSourceOver()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'source-over'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2132" title="blendSourceOver on line 2132 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2132</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="blendXor" data-name="blendXor">
      <span class="type-signature"></span>blendXor()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the blend mode to 'xor'</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2228" title="blendXor on line 2228 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2228</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="circle" data-name="circle">
      <span class="type-signature"></span>circle(x, y, radius [, fillStyle])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The x coordinate to draw the Circle at. This is the center of the circle.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The y coordinate to draw the Circle at. This is the center of the circle.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>radius</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The radius of the Circle in pixels. The radius is half the diameter.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fillStyle</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>If set the context fillStyle will be set to this value before the circle is drawn.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1929" title="circle on line 1929 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1929</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="clear" data-name="clear">
      <span class="type-signature"></span>clear( [x] [, y] [, width] [, height])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Clears the BitmapData context using a clearRect.</p>
<p>You can optionally define the area to clear.
If the arguments are left empty it will clear the entire canvas.</p>
<p>You may need to call BitmapData.update after this in order to clear out the pixel data,
but Phaser will not do this automatically for you.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate of the top-left of the area to clear.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate of the top-left of the area to clear.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The width of the area to clear. If undefined it will use BitmapData.width.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The height of the area to clear. If undefined it will use BitmapData.height.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L455" title="clear on line 455 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 455</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="cls" data-name="cls">
      <span class="type-signature"></span>cls()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Clears the BitmapData context using a clearRect.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L449" title="cls on line 449 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 449</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="copy" data-name="copy">
      <span class="type-signature"></span>copy( [source] [, x] [, y] [, width] [, height] [, tx] [, ty] [, newWidth] [, newHeight] [, rotate] [, anchorX] [, anchorY] [, scaleX] [, scaleY] [, alpha] [, blendMode] [, roundPx])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Copies a rectangular area from the source object to this BitmapData. If you give <code>null</code> as the source it will copy from itself.</p>
<p>You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.</p>
<p>All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.</p>
<p>Note that the source image can also be this BitmapData, which can create some interesting effects.</p>
<p>This method has a lot of parameters for maximum control.
You can use the more friendly methods like <code>copyRect</code> and <code>draw</code> to avoid having to remember them all.</p>
<p>You may prefer to use <code>copyTransform</code> if you're simply trying to draw a Sprite to this BitmapData,
and don't wish to translate, scale or rotate it from its original values.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>source</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|

<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|

<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
|

<span class="param-type">Image</span>
|

<span class="param-type">HTMLCanvasElement</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate representing the top-left of the region to copy from the source image.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate representing the top-left of the region to copy from the source image.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The width of the region to copy from the source image. If not specified it will use the full source image width.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The height of the region to copy from the source image. If not specified it will use the full source image height.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>tx</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate to translate to before drawing. If not specified it will default to the <code>x</code> parameter. If <code>null</code> and <code>source</code> is a Display Object, it will default to <code>source.x</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ty</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate to translate to before drawing. If not specified it will default to the <code>y</code> parameter. If <code>null</code> and <code>source</code> is a Display Object, it will default to <code>source.y</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>newWidth</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The new width of the block being copied. If not specified it will default to the <code>width</code> parameter.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>newHeight</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The new height of the block being copied. If not specified it will default to the <code>height</code> parameter.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>rotate</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The angle in radians to rotate the block to before drawing. Rotation takes place around the center by default, but can be changed with the <code>anchor</code> parameters.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>anchorX</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>anchorY</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scaleX</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The horizontal scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scaleY</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The vertical scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>alpha</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blendMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>roundPx</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1257" title="copy on line 1257 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1257</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="copyBitmapData" data-name="copyBitmapData">
      <span class="type-signature"></span>copyBitmapData( [source] [, x] [, y])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Updates a portion of the BitmapData from a source Bitmap.
This optimization is important if calling update() on a large Bitmap is causing performance issues.
Make sure you use getPixel32() instead of getPixel().
This does not work with floating point numbers for x and y.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>source</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The BitmapData you wish to copy.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The x coordinate of the top-left of the area to copy.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The y coordinate of the top-left of the area to copy.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2432" title="copyBitmapData on line 2432 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2432</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="copyRect" data-name="copyRect">
      <span class="type-signature"></span>copyRect(source, area, x, y [, alpha] [, blendMode] [, roundPx])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>source</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|

<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|

<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
|

<span class="param-type">Image</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The Image to copy from. If you give a string it will try and find the Image in the Game.Cache.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>area</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The Rectangle region to copy from the source image.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The destination x coordinate to copy the image to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The destination y coordinate to copy the image to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>alpha</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blendMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>roundPx</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1584" title="copyRect on line 1584 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1584</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="copyTransform" data-name="copyTransform">
      <span class="type-signature"></span>copyTransform( [source] [, blendMode] [, roundPx])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws the given <code>source</code> Game Object to this BitmapData, using its <code>worldTransform</code> property to set the
position, scale and rotation of where it is drawn. This function is used internally by <code>drawGroup</code>.
It takes the objects tint and scale mode into consideration before drawing.</p>
<p>You can optionally specify Blend Mode and Round Pixels arguments.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>source</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|

<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|

<span class="param-type"><a href="Phaser.BitmapText.html">Phaser.BitmapText</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The Game Object to draw.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blendMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>roundPx</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1477" title="copyTransform on line 1477 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1477</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="destroy" data-name="destroy">
      <span class="type-signature"></span>destroy()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Destroys this BitmapData and puts the canvas it was using back into the canvas pool for re-use.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2106" title="destroy on line 2106 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2106</a>
    

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<dt>
    <h4 class="name" id="draw" data-name="draw">
      <span class="type-signature"></span>draw(source [, x] [, y] [, width] [, height] [, blendMode] [, roundPx])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified.
You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.</p>
<p>The children will be drawn at their <code>x</code> and <code>y</code> world space coordinates. If this is outside the bounds of the BitmapData they won't be visible.
When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.</p>
<p>Note: You should ensure that at least 1 full update has taken place before calling this,
otherwise the objects are likely to render incorrectly, if at all.
You can trigger an update yourself by calling <code>stage.updateTransform()</code> before calling <code>draw</code>.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>source</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|

<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The Sprite, Image or Text object to draw onto this BitmapData.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate to translate to before drawing. If not specified it will default to <code>source.x</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate to translate to before drawing. If not specified it will default to <code>source.y</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The new width of the Sprite being copied. If not specified it will default to <code>source.width</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The new height of the Sprite being copied. If not specified it will default to <code>source.height</code>.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blendMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>roundPx</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1602" title="draw on line 1602 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1602</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="drawFull" data-name="drawFull">
      <span class="type-signature"></span>drawFull(parent [, blendMode] [, roundPx])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children.</p>
<p>If a child has an <code>exists</code> property then it (and its children) will be only be drawn if exists is <code>true</code>.</p>
<p>The children will be drawn at their <code>x</code> and <code>y</code> world space coordinates. If this is outside the bounds of the BitmapData
they won't be drawn. Depending on your requirements you may need to resize the BitmapData in advance to match the
bounds of the top-level Game Object.</p>
<p>When drawing it will take into account the child's world rotation, scale and alpha values.</p>
<p>It's perfectly valid to pass in <code>game.world</code> as the parent object, and it will iterate through the entire display list.</p>
<p>Note: If you are trying to grab your entire game at the start of a State then you should ensure that at least 1 full update
has taken place before doing so, otherwise all of the objects will render with incorrect positions and scales. You can
trigger an update yourself by calling <code>stage.updateTransform()</code> before calling <code>drawFull</code>.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>parent</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.World.html">Phaser.World</a></span>
|

<span class="param-type"><a href="Phaser.Group.html">Phaser.Group</a></span>
|

<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|

<span class="param-type"><a href="Phaser.BitmapText.html">Phaser.BitmapText</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The Game Object to draw onto this BitmapData and then recursively draw all of its children.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blendMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>roundPx</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1692" title="drawFull on line 1692 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1692</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="drawGroup" data-name="drawGroup">
      <span class="type-signature"></span>drawGroup(group [, blendMode] [, roundPx])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws the immediate children of a Phaser.Group to this BitmapData.</p>
<p>It's perfectly valid to pass in <code>game.world</code> as the Group, and it will iterate through the entire display list.</p>
<p>Children are drawn <em>only</em> if they have their <code>exists</code> property set to <code>true</code>, and have image, or RenderTexture, based Textures.</p>
<p>The children will be drawn at their <code>x</code> and <code>y</code> world space coordinates. If this is outside the bounds of the BitmapData they won't be visible.
When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.</p>
<p>Note: You should ensure that at least 1 full update has taken place before calling this,
otherwise the objects are likely to render incorrectly, if at all.
You can trigger an update yourself by calling <code>stage.updateTransform()</code> before calling <code>drawGroup</code>.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>group</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Group.html">Phaser.Group</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The Group to draw onto this BitmapData. Can also be Phaser.World.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blendMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>roundPx</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1629" title="drawGroup on line 1629 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1629</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="extract" data-name="extract">
      <span class="type-signature"></span>extract(destination, r, g, b [, a] [, resize] [, r2] [, g2] [, b2])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData.
The original BitmapData remains unchanged.
The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true.
Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid:
<code>picture.extract(mask, r, g, b)</code>
You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color.
If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint
the color during extraction.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>destination</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The BitmapData that the extracted pixels will be drawn to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>r</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The red color component, in the range 0 - 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>g</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The green color component, in the range 0 - 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>b</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The blue color component, in the range 0 - 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>a</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    255
                
                </td>
            

            <td class="description param-description last"><p>The alpha color component, in the range 0 - 255 that the new pixel will be drawn at.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resize</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Should the destination BitmapData be resized to match this one before the pixels are copied?</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>r2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An alternative red color component to be written to the destination, in the range 0 - 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>g2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An alternative green color component to be written to the destination, in the range 0 - 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>b2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An alternative blue color component to be written to the destination, in the range 0 - 255.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1813" title="extract on line 1813 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1813</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The BitmapData that the extract pixels were drawn on.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="fill" data-name="fill">
      <span class="type-signature"></span>fill(r, g, b [, a])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Fills the BitmapData with the given color.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>r</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The red color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>g</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The green color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>b</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The blue color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>a</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The alpha color value, between 0 and 1.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L485" title="fill on line 485 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 485</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="generateTexture" data-name="generateTexture">
      <span class="type-signature"></span>generateTexture(key [, callback] [, callbackContext])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Creates a new <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image">Image</a> element by converting this BitmapDatas canvas into a dataURL.</p>
<p>The image is then stored in the <a href="Phaser.Cache.html">image Cache</a> using the key given.</p>
<p>Finally a <a href="PIXI.Texture.html">PIXI.Texture</a> is created based on the image and returned.</p>
<p>You can apply the texture to a sprite or any other supporting object by using either the
key or the texture. First call <code>generateTexture</code>:</p>
<pre class="prettyprint source lang-javascript"><code>var texture = bitmapdata.generateTexture('ball');
</code></pre>
<p>Then you can either apply the texture to a sprite:</p>
<pre class="prettyprint source lang-javascript"><code>game.add.sprite(0, 0, texture);
</code></pre>
<p>or by using the string based key:</p>
<pre class="prettyprint source lang-javascript"><code>game.add.sprite(0, 0, 'ball');
</code></pre>
<p>Most browsers now load the image data asynchronously, so you should use a callback:</p>
<pre class="prettyprint source lang-javascript"><code>bitmapdata.generateTexture('ball', function (texture) {
    game.add.sprite(0, 0, texture);
    // or
    game.add.sprite(0, 0, 'ball');
});
</code></pre>
<p>If this BitmapData is available during preload, you can use <a href="Phaser.Loader.html#imageFromBitmapData">Phaser.Loader#imageFromBitmapData</a> instead.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>key</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The key which will be used to store the image in the Cache.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>A function to execute once the texture is generated. It will be passed the newly generated texture.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callbackContext</code></td>
            

            <td class="type">
            
                
<span class="param-type">any</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The context in which to invoke the callback.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L548" title="generateTexture on line 548 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 548</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>The newly generated texture, or <code>null</code> if a callback was passed and the texture isn't available yet.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="PIXI.Texture.html">PIXI.Texture</a></span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getBase64" data-name="getBase64">
      <span class="type-signature"></span>getBase64( [type] [, encoderOptions])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Returns a data URI representing the bitmap image.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Image format.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>encoderOptions</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Image quality, for lossy formats.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L506" title="getBase64 on line 506 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 506</a>
    

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL">https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <ul>
<li>The data URI.</li>
</ul>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getBounds" data-name="getBounds">
      <span class="type-signature"></span>getBounds( [rect])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels.
The rectangle returned will extend from the top-left of the image to the bottom-right, excluding transparent pixels.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>rect</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>If provided this Rectangle object will be populated with the bounds, otherwise a new object will be created.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1205" title="getBounds on line 1205 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1205</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>A Rectangle whose dimensions encompass the full extent of non-transparent pixels in this BitmapData.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getFirstPixel" data-name="getFirstPixel">
      <span class="type-signature"></span>getFirstPixel( [direction])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Scans the BitmapData, pixel by pixel, until it encounters a pixel that isn't transparent (i.e. has an alpha value &gt; 0).
It then stops scanning and returns an object containing the color of the pixel in r, g and b properties and the location in the x and y properties.</p>
<p>The direction parameter controls from which direction it should start the scan:</p>
<p>0 = top to bottom
1 = bottom to top
2 = left to right
3 = right to left</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>direction</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The direction in which to scan for the first pixel. 0 = top to bottom, 1 = bottom to top, 2 = left to right and 3 = right to left.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1123" title="getFirstPixel on line 1123 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1123</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>Returns an object containing the color of the pixel in the <code>r</code>, <code>g</code> and <code>b</code> properties and the location in the <code>x</code> and <code>y</code> properties.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">object</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getImage" data-name="getImage">
      <span class="type-signature"></span>getImage( [type] [, encoderOptions] [, onLoadCallback] [, onErrorCallback])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Returns an HTML image of the bitmap.</p>
<p>The image is loaded asynchronously, not right away.
Use the callbacks if you need to wait for the loaded image.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Image format.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>encoderOptions</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>Image quality, for lossy formats.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onLoadCallback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>A function to call when the image loads.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onErrorCallback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>A function to call when the image fails to load.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L521" title="getImage on line 521 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 521</a>
    

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="Phaser.BitmapData.html#getBase64">Phaser.BitmapData#getBase64</a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <ul>
<li>The image.</li>
</ul>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">HTMLImageElement</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getPixel" data-name="getPixel">
      <span class="type-signature"></span>getPixel(x, y [, out])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Get the color of a specific pixel in the context into a color object.
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>out</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1044" title="getPixel on line 1044 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1044</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>An object with the red, green, blue and alpha values set in the r, g, b and a properties.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">object</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getPixel32" data-name="getPixel32">
      <span class="type-signature"></span>getPixel32(x, y)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Get the color of a specific pixel including its alpha value.
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.
Note that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1074" title="getPixel32 on line 1074 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1074</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>A native color value integer (format: 0xAARRGGBB)</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">number</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getPixelRGB" data-name="getPixelRGB">
      <span class="type-signature"></span>getPixelRGB(x, y [, out] [, hsl] [, hsv])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties.
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>out</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An object into which 3 properties will be created: r, g and b. If not provided a new object will be created.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>hsl</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Also convert the rgb values into hsl?</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>hsv</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description param-description last"><p>Also convert the rgb values into hsv?</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1093" title="getPixelRGB on line 1093 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1093</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>An object with the red, green and blue values set in the r, g and b properties.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">object</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getPixels" data-name="getPixels">
      <span class="type-signature"></span>getPixels(rect)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Gets all the pixels from the region specified by the given Rectangle object.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>rect</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



            
            </td>

            

            

            <td class="description param-description last"><p>The Rectangle region to get.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1111" title="getPixels on line 1111 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1111</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>Returns a ImageData object containing a Uint8ClampedArray data property.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">ImageData</span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="line" data-name="line">
      <span class="type-signature"></span>line(x1, y1, x2, y2 [, color] [, width])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws a line between the coordinates given in the color and thickness specified.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x1</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate to start the line from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y1</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate to start the line from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate to draw the line to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate to draw the line to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>color</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    '#fff'
                
                </td>
            

            <td class="description param-description last"><p>The stroke color that the line will be drawn in.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The line thickness.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1957" title="line on line 1957 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1957</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="load" data-name="load">
      <span class="type-signature"></span>load(source)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Takes the given Game Object, resizes this BitmapData to match it and then draws it into this BitmapDatas canvas, ready for further processing.
The source game object is not modified by this operation.
If the source object uses a texture as part of a Texture Atlas or Sprite Sheet, only the current frame will be used for sizing.
If a string is given it will assume it's a cache key and look in Phaser.Cache for an image key matching the string.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>source</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|

<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|

<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|

<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|

<span class="param-type">Image</span>
|

<span class="param-type">HTMLCanvasElement</span>
|

<span class="param-type">string</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The object that will be used to populate this BitmapData. If you give a string it will try and find the Image in the Game.Cache first.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L415" title="load on line 415 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 415</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="move" data-name="move">
      <span class="type-signature"></span>move(x, y [, wrap])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Shifts the contents of this BitmapData by the distances given.</p>
<p>The image will wrap-around the edges on all sides if the wrap argument is true (the default).</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The amount of pixels to horizontally shift the canvas by. Use a negative value to shift to the left, positive to the right.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The amount of pixels to vertically shift the canvas by. Use a negative value to shift up, positive to shift down.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>wrap</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>Wrap the content of the BitmapData.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L237" title="move on line 237 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 237</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="moveH" data-name="moveH">
      <span class="type-signature"></span>moveH(distance [, wrap])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Shifts the contents of this BitmapData horizontally.</p>
<p>The image will wrap-around the sides if the wrap argument is true (the default).</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>distance</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The amount of pixels to horizontally shift the canvas by. Use a negative value to shift to the left, positive to the right.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>wrap</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>Wrap the content of the BitmapData.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L263" title="moveH on line 263 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 263</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="moveV" data-name="moveV">
      <span class="type-signature"></span>moveV(distance [, wrap])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Shifts the contents of this BitmapData vertically.</p>
<p>The image will wrap-around the sides if the wrap argument is true (the default).</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>distance</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The amount of pixels to vertically shift the canvas by. Use a negative value to shift up, positive to shift down.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>wrap</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>Wrap the content of the BitmapData.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L325" title="moveV on line 325 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 325</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="polygon" data-name="polygon">
      <span class="type-signature"></span>polygon(points [, fillStyle] [, lineWidth] [, strokeStyle])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws a polygon.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>points</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;object></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>An array of <a href="Phaser.Point.html">Phaser.Point</a> or point-like objects.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fillStyle</code></td>
            

            <td class="type">
            
                
<span class="param-type">CanvasGradient</span>
|

<span class="param-type">CanvasPattern</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>A color, gradient, or pattern.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>lineWidth</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The line thickness.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>strokeStyle</code></td>
            

            <td class="type">
            
                
<span class="param-type">CanvasGradient</span>
|

<span class="param-type">CanvasPattern</span>
|

<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    '#fff'
                
                </td>
            

            <td class="description param-description last"><p>The line color, gradient, or pattern (when <code>lineWidth</code> &gt; 0).</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1990" title="polygon on line 1990 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1990</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="processPixel" data-name="processPixel">
      <span class="type-signature"></span>processPixel(callback, callbackContext [, x] [, y] [, width] [, height])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates.
Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped.
Note that the format of the color received will be different depending on if the system is big or little endian.
It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead.
The callback will also be sent the pixels x and y coordinates respectively.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The callback that will be sent each pixel color to be processed.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callbackContext</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The context under which the callback will be called.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate of the top-left of the region to process from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate of the top-left of the region to process from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The width of the region to process.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The height of the region to process.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L765" title="processPixel on line 765 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 765</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="processPixelRGB" data-name="processPixelRGB">
      <span class="type-signature"></span>processPixelRGB(callback, callbackContext [, x] [, y] [, width] [, height])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback.
The callback will be sent a color object with 6 properties: <code>{ r: number, g: number, b: number, a: number, color: number, rgba: string }</code>.
Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha.
The <code>color</code> property is an Int32 of the full color. Note the endianess of this will change per system.
The <code>rgba</code> property is a CSS style rgba() string which can be used with context.fillStyle calls, among others.
The callback will also be sent the pixels x and y coordinates respectively.
The callback must return either <code>false</code>, in which case no change will be made to the pixel, or a new color object.
If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The callback that will be sent each pixel color object to be processed.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callbackContext</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The context under which the callback will be called.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate of the top-left of the region to process from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate of the top-left of the region to process from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The width of the region to process.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The height of the region to process.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L708" title="processPixelRGB on line 708 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 708</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="rect" data-name="rect">
      <span class="type-signature"></span>rect(x, y, width, height [, fillStyle])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The x coordinate of the top-left of the Rectangle.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The y coordinate of the top-left of the Rectangle.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The width of the Rectangle.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The height of the Rectangle.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fillStyle</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>If set the context fillStyle will be set to this value before the rect is drawn.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1865" title="rect on line 1865 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1865</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="render" data-name="render">
      <span class="type-signature"></span>render()
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>If the game is running in WebGL this will push the texture up to the GPU if it's dirty.
This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function.
If you wish to suppress this functionality set BitmapData.disableTextureUpload to <code>true</code>.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2087" title="render on line 2087 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2087</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="replaceRGB" data-name="replaceRGB">
      <span class="type-signature"></span>replaceRGB(r1, g1, b1, a1, r2, g2, b2, a2 [, region])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values.
An optional region parameter controls if the replacement happens in just a specific area of the BitmapData or the entire thing.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>r1</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The red color value to be replaced. Between 0 and 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>g1</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The green color value to be replaced. Between 0 and 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>b1</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The blue color value to be replaced. Between 0 and 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>a1</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The alpha color value to be replaced. Between 0 and 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>r2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The red color value that is the replacement color. Between 0 and 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>g2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The green color value that is the replacement color. Between 0 and 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>b2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The blue color value that is the replacement color. Between 0 and 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>a2</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The alpha color value that is the replacement color. Between 0 and 255.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>region</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description param-description last"><p>The area to perform the search over. If not given it will replace over the whole BitmapData.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L818" title="replaceRGB on line 818 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 818</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="resize" data-name="resize">
      <span class="type-signature"></span>resize(width, height)
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The new width of the BitmapData.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            

            

            <td class="description param-description last"><p>The new height of the BitmapData.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L622" title="resize on line 622 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 622</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="setHSL" data-name="setHSL">
      <span class="type-signature"></span>setHSL( [h] [, s] [, l] [, region])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>h</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The hue, in the range 0 - 1.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>s</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The saturation, in the range 0 - 1.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>l</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The lightness, in the range 0 - 1.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>region</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The area to perform the operation on. If not given it will run over the whole BitmapData.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L867" title="setHSL on line 867 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 867</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="setPixel" data-name="setPixel">
      <span class="type-signature"></span>setPixel(x, y, red, green, blue [, immediate])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the color of the given pixel to the specified red, green and blue values.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>red</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The red color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>green</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The green color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blue</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The blue color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>immediate</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>If <code>true</code> the context.putImageData will be called and the dirty flag set.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1027" title="setPixel on line 1027 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1027</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="setPixel32" data-name="setPixel32">
      <span class="type-signature"></span>setPixel32(x, y, red, green, blue, alpha [, immediate])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the color of the given pixel to the specified red, green, blue and alpha values.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">integer</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData and be an integer, not a float.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>red</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The red color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>green</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The green color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blue</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The blue color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>alpha</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The alpha color value, between 0 and 0xFF (255).</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>immediate</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>If <code>true</code> the context.putImageData will be called and the dirty flag set.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L989" title="setPixel32 on line 989 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 989</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="shadow" data-name="shadow">
      <span class="type-signature"></span>shadow(color [, blur] [, x] [, y])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it.
You can cancel an existing shadow by calling this method and passing no parameters.
Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>color</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The color of the shadow, given in a CSS format, i.e. <code>#000000</code> or <code>rgba(0,0,0,1)</code>. If <code>null</code> or <code>undefined</code> the shadow will be reset.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blur</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    5
                
                </td>
            

            <td class="description param-description last"><p>The amount the shadow will be blurred by. Low values = a crisp shadow, high values = a softer shadow.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    10
                
                </td>
            

            <td class="description param-description last"><p>The horizontal offset of the shadow in pixels.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    10
                
                </td>
            

            <td class="description param-description last"><p>The vertical offset of the shadow in pixels.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1749" title="shadow on line 1749 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1749</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="shiftHSL" data-name="shiftHSL">
      <span class="type-signature"></span>shiftHSL( [h] [, s] [, l] [, region])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.
Shifting will add the given value onto the current h, s and l values, not replace them.
The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>h</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The amount to shift the hue by. Within [-1, 1].</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>s</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The amount to shift the saturation by. Within [-1, 1].</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>l</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description param-description last"><p>The amount to shift the lightness by. Within [-1, 1].</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>region</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The area to perform the operation on. If not given it will run over the whole BitmapData.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L927" title="shiftHSL on line 927 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 927</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="text" data-name="text">
      <span class="type-signature"></span>text(text, x, y [, font] [, color] [, shadow])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Draws text to the BitmapData in the given font and color.
The default font is 14px Courier, so useful for quickly drawing debug text.
If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>text</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The text to write to the BitmapData.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate of the top-left of the text string.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate of the top-left of the text string.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>font</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    '14px Courier'
                
                </td>
            

            <td class="description param-description last"><p>The font. This is passed directly to Context.font, so anything that can support, this can.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>color</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'rgb(255,255,255)'
                
                </td>
            

            <td class="description param-description last"><p>The color the text will be drawn in.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>shadow</code></td>
            

            <td class="type">
            
                
<span class="param-type">boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description param-description last"><p>Draw a single pixel black shadow below the text (offset by text.x/y + 1)</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L1888" title="text on line 1888 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 1888</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="textureLine" data-name="textureLine">
      <span class="type-signature"></span>textureLine(line, image [, repeat])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>Takes the given Line object and image and renders it to this BitmapData as a repeating texture line.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>line</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Phaser.Line.html">Phaser.Line</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>A Phaser.Line object that will be used to plot the start and end of the line.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>image</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">Image</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description param-description last"><p>The key of an image in the Phaser.Cache to use as the texture for this line, or an actual Image.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>repeat</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'repeat-x'
                
                </td>
            

            <td class="description param-description last"><p>The pattern repeat mode to use when drawing the line. Either <code>repeat</code>, <code>repeat-x</code> or <code>no-repeat</code>.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L2038" title="textureLine on line 2038 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 2038</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        
            
<dt>
    <h4 class="name" id="update" data-name="update">
      <span class="type-signature"></span>update( [x] [, y] [, width] [, height])
      
    </h4>
    
</dt>
<dd>

    
    <div class="description method-description">
        <p>This re-creates the BitmapData.imageData from the current context.
It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array.
If not given the dimensions defaults to the full size of the context.</p>
<p>Warning: This is a very expensive operation, so use it sparingly.</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The x coordinate of the top-left of the image data area to grab from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description param-description last"><p>The y coordinate of the top-left of the image data area to grab from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The width of the image data area.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description param-description last"><p>The height of the image data area.</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	
	<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
	<dd class="tag-source">
    
      <a href="https://github.com/photonstorm/phaser-ce/blob/v2.20.1/src/gameobjects/BitmapData.js#L665" title="update on line 665 of src/gameobjects/BitmapData.js">src/gameobjects/BitmapData.js line 665</a>
    

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>This BitmapData object for method chaining.</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>



    </dd>
</dl>


        

    
</dd>

        </dl>
    

    

    
</article>

</section>



</div>
	    <footer class="footer">


<p class="package-signature">
  phaser-ce@2.20.1
  is on
  <a href="https://github.com/photonstorm/phaser-ce/releases/tag/v2.20.1">GitHub</a>
  and
  <a href="https://www.npmjs.com/package/phaser-ce">NPM</a>
</p>





	<p class="copyright">
	Phaser Copyright © 2012-2016 Photon Storm Ltd.
	</p>


<p class="jsdoc-message">
	Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a>
	
		on 2024-10-05
	
	using <a href="https://github.com/photonstorm/phaser-ce/tree/master/resources/docstrap-master">Tomorrow</a>.
</p>

</footer>

		</div>
    
      <div class="toc-container hidden-xs hidden-sm">
  <div class="toc-filter">
    <div class="form-inline">
    <div class="form-group">
      <label for="filter" class="control-label">Filter</label>
      <input type="text" class="form-control" id="toc-filter-input">
    </div>
  </div>
  </div>
  <div id="toc">
    <div class="list-group">
      <div id="toc-insert"></div>
    </div>
  </div>
</div>

    
	</div>
</div>

<script defer src="scripts/bundle.js?2024100511"></script>



</body>
</html>